from sqlalchemy import Table

from common.database import db_connect
db_session,engine,Base=db_connect()

class User(Base):
    # 表结构反射
    __tablename__ = Table('user', Base.metadata, autoload_with=engine)
    def get_one(self):
        return db_session.query(User).first()